<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="com.transcargo.users.User" %>
<%@ include file="header.jsf"%>
<%@ include file="session.jsf"%>
<%
    if (User_Id <= 0) {
        response.sendRedirect("auth.jsp");
        return;
    }
	String id = request.getParameter("id");
	if (id == null || id.length() == 0 || Integer.parseInt(id) == 0) {
		response.sendRedirect("mail.jsp");
		return;
	}
	int Id = Integer.parseInt(id);
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
  	<head><title>TransCargo</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <script type="text/javascript" src="ajaxrequest.js"></script>
    <script type="text/javascript" src="forms.js"></script>
	<link type="text/css" href="transcargo.css" rel="stylesheet"/>
	<script type="text/javascript">
	var xslDoc = new Array();
	var xslDocNames = new Array();
	xslDocNames[0] = 'transform/readmail.xslt';
    if (window.DOMParser == null) {
	  xslDoc[0]=new ActiveXObject("Microsoft.XMLDOM");
	  xslDoc[0].async="false";
	}
	</script>
  </head>
  <body onload="getMail(<%=Id %>)">
    <table cellpadding="0" cellspacing="0" border="0" width="100%">
        <tr><td colspan="2">
			<%@include file="page_header.jsf"%>
        </td></tr>
        <tr><td width="80%" align="center">
            <b>Почта</b><br><br>
		<div id="MsgArea"></div>
		<br><br><a href="sendmail.jsp">Написать письмо</a><br>
		<a href="mail.jsp">Посмотреть входящие</a><br>
		<a href="mail.jsp?outbox">Посмотреть отправленные</a><br>
        </td><td valign="top"><%@include file="login.jsf"%><br><%@include file="quicksearch.jsf"%></td></tr>
        </table>
  </body>
</html>
